#include <stdio.h>

void swap2(int *p1, int *p2) {
    int *temp;
    printf("p1 = %p\n", p1);
    printf("p2 = %p\n", p2);
    temp = p1;
    p1 = p2;
    p2 = temp;
    printf("\n\n");
    printf("p1 = %p\n", p1);
    printf("p2 = %p\n", p2);
}

int main() {
    int a = 10, b = 20;
    int *pointer_1 = &a;
    int *pointer_2 = &b;
    printf("pointer_1 = %p\n", pointer_1);
    printf("pointer_2 = %p\n", pointer_2);
    printf("Before swap: a = %d, b = %d\n", a, b);

    swap2(pointer_1, pointer_2);

    printf("pointer_1 = %p\n", pointer_1);
    printf("pointer_2 = %p\n", pointer_2);
    printf("After swap: a = %d, b = %d\n", a, b);
    return 0;
}